package com.ucode.cgms.mapper;

import com.ucode.model.cgms.CgmsRebateFlow;
import com.ucode.springboot.starter.mybatis.core.base.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Collection;
import java.util.Date;

/**
 * 返点流水Mapper
 * @Author: Claude
 * @Date: 2023/05/26 11:00
 * @Version: 1.0
 */
@Mapper
public interface CgmsRebateFlowMapper extends BaseMapper<CgmsRebateFlow, Long> {

    /**
     * 变更状态
     * @param ids 编号集合
     * @param status 状态
     * @return 影响行数
     */
    public int updateStatus(@Param("ids") Collection<Long> ids, @Param("status") Integer status);
    
    /**
     * 更新结算状态
     * @param id 主键
     * @param settleStatus 结算状态
     * @param settleTime 结算时间
     * @return 更新数量
     */
    public int updateSettleStatus(@Param("id") Long id, @Param("settleStatus") Integer settleStatus, @Param("settleTime") Date settleTime);

    /**
     * 批量更新结算状态
     * @param ids 主键集合
     * @param settleStatus 结算状态
     * @param settleTime 结算时间
     * @return 更新数量
     */
    public int batchUpdateSettleStatus(@Param("list") Collection<Long> ids, @Param("settleStatus") Integer settleStatus, @Param("settleTime") Date settleTime);
} 